﻿@using SplendidCRM
@using SplendidCRM.Ext
@using SplendidCRM.Ext.Helpers
@using SplendidCRM.Ext.Models

@model PhoneNumberModel

@{
    var formId = Guid.NewGuid();
}

<form id="@formId" action="" autocomplete="off" data-bind="noSubmit: true">    
    
    @Html.Field(FieldType.Hidden, null, "value: ServiceName")
    @Html.Field(FieldType.Text, new { fieldLabel = @Model.ServiceName.Equals(PhoneNumberModel.ViewNames[3])?"Card Number" : "Phone number", containerClass = "solid-border" }, "value: PhoneNumber")


    <div class="clear"></div>
    <input type="submit" class="form-button" value="Submit" href="@Url.Action("PhoneNumberServiceQuery")" data-bind="send: { stringify: true, update: '#@formId-list', dataType: 'html' }" />

    <div id="@formId-list" style="margin-top: 20px "></div>
</form>

<script type="text/javascript">
$(function () {
    var model = @Html.Raw(Model.Json(true)) ;
    linq.model(model, '#@formId');
});

</script>